package com.xsj.controller;

import com.xsj.utils.Capt;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "验证码")
@CrossOrigin
@RestController
@RequestMapping({"/captcha"})
public class CaptController {
    @Autowired
    private Capt capt;




    @Operation(summary = "验证码", description = "生成验证码")
    @GetMapping({"/code"})
    public void generateCaptcha(HttpServletResponse response) {
        this.capt.generateCaptcha(response);
    }
}
